package com.qk.management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qk.dto.activity.ActivityDTO;
import com.qk.entity.Activity;
import com.qk.vo.activity.ActivityQueryVO;
import com.qk.vo.activity.ActivityVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:zhengbowen
 * @Date: 2025/10/10 19:56
 * @Description:
 */
@Mapper
public interface ActivityMapper extends BaseMapper<Activity> {


    @Select("select * from activity where id = #{id}")
    ActivityVO selectActivityById(Long id);

    @Select("select * from activity")
    List<ActivityVO> selectActivityList();

    void updateActivity(Activity activity);

    void insertActivity(Activity activity);


    void deleteBatchActivities(List<Integer> ids);

    @Select("delete from activity where id = #{id}")
    void deleteActivity(Integer id);


    List<ActivityQueryVO> selectActivitiesByPage(ActivityDTO activityDto);

    @Select("select * from activity where type = #{type}")
    List<ActivityVO> selectActivityListByType(Integer type);
}


